import { ITitleType, IOperateType, ILogType, IOperationType, IFileType } from './type';
import type { IOptionType } from './type';

export const titleMap: Record<ITitleType, Record<string, string>> = {
  [ITitleType.IMPORT_VIDEO]: {
    title: '导入视频',
    subTitle: '仅支持mp4文件，文件大小最大限制15MB',
  },
  [ITitleType.IMPORT_FILE]: {
    title: '导入文档',
    subTitle: '仅支持PDF文件',
  },
};

export const fileMap: Record<IFileType, string> = {
  [IFileType.VIDEO]: '视频',
  [IFileType.PDF]: 'PDF',
};

export const modalTitleMap: Record<string, string> = {
  [IOperationType.EDIT]: '编辑常见问题',
  [IOperationType.ADD]: '创建常见问题',
};

export const operateTypeMap: Record<ILogType, Record<IOperateType, string>> = {
  [ILogType.INFO]: {
    [IOperateType.CREATE]: '新增操作资料',
    [IOperateType.REMOVE]: '删除操作资料',
    [IOperateType.UPDATE]: '重新上传操作资料',
  },
  [ILogType.FQA]: {
    [IOperateType.CREATE]: '新增FAQ',
    [IOperateType.REMOVE]: '删除FAQ',
    [IOperateType.UPDATE]: '编辑FAQ',
  },
};
export const infoOperationList: IOptionType[] = [
  { label: '删除', value: IOperationType.DETELE },
  { label: '重新上传', value: IOperationType.EDIT },
];

export const questionOperationList: IOptionType[] = [
  { label: '删除', value: IOperationType.DETELE },
  { label: '编辑', value: IOperationType.EDIT },
];
